package xyz.renyumeng.xkm.shop.service;

import com.baomidou.mybatisplus.extension.service.IService;
import xyz.renyumeng.xkm.dto.base.SearchPage;
import xyz.renyumeng.xkm.dto.shop.ProductInfoDto;
import xyz.renyumeng.xkm.model.es.EsProduct;
import xyz.renyumeng.xkm.model.shop.ProductInfo;
import xyz.renyumeng.xkm.result.Result;

import java.util.List;

/**
 * @author renyumeng
 * @date Created in 20:52 2023/7/2
 */


public interface UserProductService extends IService<ProductInfo> {
    Result<Object> listedProduct(Long productId,Integer isListed);

    Result<SearchPage<List<EsProduct>>> pageProductIInfoWithFilter(Integer current, Integer size, String filter);

    Result<Object> addProductInfo(ProductInfoDto productInfoDto);

    Result<Object> upDateProduct(ProductInfoDto productInfoDto);

    Result<Object> deleteProductById(Long productId);

    Result<EsProduct> getProductById(Long productId);

    Result<SearchPage<List<EsProduct>>> getProductListByOwnerId(Long ownerId,Integer page,Integer size);

    Result<SearchPage<List<EsProduct>>> getProductIsSoleListByOwnerId(Long ownerId, Integer page, Integer size);
}
